package plantshop.controller.moves;

import java.io.Serializable;

import plantshop.model.Creature;
import plantshop.model.Game;
import plantshop.model.Location;

public class CreatureWalkMove extends TimeMove implements Serializable{
	private static final long serialVersionUID = -7923701730718592071L;
	private Creature c;
	private int x, y;
	
	public CreatureWalkMove(Creature c, int x, int y){
		this.c = c;
		this.x = x;
		this.y = y;
	}
	@Override
	public void execute(Game game) {		
		c.setLocation(new Location(c.getLocation().getX()+x,c.getLocation().getY()+y));
	}
	
	public int getX()
	{
		return x;
	}
	
	public int getY()
	{
		return y;
	}

}
